/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MyClass;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author God
 */
public class DBConnector {

    public static Connection getConnection() throws ClassNotFoundException, SQLException {
        // load driver
        String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
        Class.forName(driver);

        // tao ket noi
        String jdbc_url = "jdbc:odbc:FUTradingDB";
        Connection con = DriverManager.getConnection(jdbc_url);
        
        return con;
    }
}
